#pragma once

class CCalc;

class Thread
{
public:
	Thread();
	~Thread();

	bool GetIsBusy() const;
	void SetIsBusy(bool nbusy);

	uint GetTaskDoneSoFar();
	void SetTaskDoneSoFar(uint i);
	void IncrementTaskDoneSoFar();

	void Wait();
	void Start();
	void Stop();

	bool IsLooping();

private:
	SDL_Thread* m_sdlThread;			//!<Wątek SDLowski

	bool m_isBusy;
	uint m_taskDoneSoFar;
	bool m_keepThreadAlive;
};

typedef std::vector<Thread*> ThreadPtnVec;

int SingleThread(void* data);